<?php
session_start();
if (!isset ($_SESSION["token"])){
  header("Location: login.php");
}
require_once '../../config.inc';
require_once '../../lib/common.inc.php';


$pass=new Password();
$mysql=new mySQL(array( "db_user" => $_SESSION["dbuser"],
                          "db_pass" =>$pass->decrypt($_SESSION["dbpass"]),
                          "db_host" => DB_HOST));
$mysql->dbconnect();

$variables=$mysql->getServerVariables();

?>
<table class="server_data" style="margin: 10px;width: 90%">
  <tr style="background-color: #D5E1F3;"><td style="width:150px;padding-left: 5px;text-align: left; color: #15428B;">Variable</td><td style="width:80px;text-align: left;color: #15428B;">SESSION</td><td style="width:80px;text-align: left; color: #15428B;">GLOBAL</td></tr>
 <?php
    foreach ($variables as $name=>$v){
      ?>
      <tr>
        <td class="srv_title" style="width:150px;padding-left: 5px;"><?php echo $name?></td>
        <td style="width:80px;text-align: left;padding-left: 5px;"><?php echo str_ireplace(',', '<br>', $v["session"]) ?></td>
        <td style="width:80px;text-align: left;padding-left: 5px;"><?php echo str_ireplace(',', '<br>', $v["global"]) ?></td>
      </tr>
      <?php
    }
  ?>
</table>
